<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQaecmsShopsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('qaecms_shops', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->comment('名称');
            $table->string('type')->comment('分类');
            $table->mediumText('image')->comment('图片地址');
            $table->mediumText('desc')->comment('描述');
            $table->decimal('price',10,2)->comment('价格');
            $table->integer('number')->comment('规格');
            $table->integer('stock')->comment('库存');
            $table->tinyInteger('vip')->comment('限制购买等级 0注册用户');
            $table->tinyInteger('status')->comment('1上架 0下架')->default(0);
            $table->dateTime('deleted_at')->comment('软删除时间')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('qaecms_shops');
    }
}
